home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Bitmap / Include / RbbrBand.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.0 KB  |  75 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                RbbrBand.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef RBBRBAND_H
  13. #define RBBRBAND_H
  14.  
  15. // ----- Framework Includes -----
  16.  
  17. #ifndef FWTRACKR_H
  18. #include "FWTrackr.h"
  19. #endif
  20.  
  21. // ----- Graphic Includes -----
  22.  
  23. #ifndef FWRECSHP_H
  24. #include "FWRecShp.h"
  25. #endif
  26.  
  27. //========================================================================================
  28. //    class CRectRubberBand
  29. //========================================================================================
  30.  
  31. class FW_CLASS_ATTR CRectRubberBand : public FW_CTracker
  32. {
  33. //-----------------------------------------------------------------------------------------
  34. //    Constructors/Destructor
  35. //
  36. public:
  37.     CRectRubberBand(Environment* ev, 
  38.                     FW_CView* view, 
  39.                     ODFacet* facet, 
  40.                     const FW_CRect& maxRect, 
  41.                     const FW_CPoint& zoomRatio);
  42.     virtual ~CRectRubberBand();
  43.     
  44. //-----------------------------------------------------------------------------------------
  45. //    Inherited API
  46. //
  47. public:
  48.     virtual FW_CPoint     BeginTracking(Environment* ev, 
  49.                                 const FW_CPoint& anchorPoint);
  50.     virtual FW_CPoint     ContinueTracking(Environment* ev, 
  51.                                 const FW_CPoint& anchorPoint, 
  52.                                 const FW_CPoint& previousPoint, 
  53.                                 const FW_CPoint& currentPoint);
  54.     virtual FW_Boolean    EndTracking(Environment* ev, 
  55.                                 const FW_CPoint& anchorPoint, 
  56.                                 const FW_CPoint& lastPoint);
  57.  
  58. //-----------------------------------------------------------------------------------------
  59. //    New API
  60. //
  61. public:
  62.     void                GetRect(FW_CRect& rect)
  63.                             {fRectShape.GetRectangle(rect);}
  64.     FW_CPoint            AlignOnPixel(const FW_CPoint& location);
  65.     
  66. //-----------------------------------------------------------------------------------------
  67. //    Data Members
  68. //
  69. private:
  70.     FW_CRectShape        fRectShape;
  71.     FW_CRect            fMaxRect;
  72.     FW_CPoint            fZoomRatio;
  73. };
  74.  
  75. #endif